package com.wisezone.demo0218;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class MyHander implements InvocationHandler {
    private  Object object;
    public MyHander(Object object){
        this.object = object;
    }
    @Override
    public Object invoke(Object proxy, Method method , Object[]args) throws Throwable {
        Object o = null;
        System.out.println("执行代理开始。。。。。。");
        o = method.invoke(this.object,args);
        System.out.println("执行代理结束。。。。。。");
        return o;

    }
}
